import HttpRequest from '@/api/request';
import ApiConfig from '@/api/api-config';
import qs from 'qs';

function getMenuSearch(data) {
    let url = ApiConfig.getMenuUrl;
    return HttpRequest.requestJsonPost(url,data)
}

function getUserInfo(options){
    let url = ApiConfig.getUserUrl;
    return HttpRequest.requestJsonPost(url,options)
}
function checkUser(options){
    let url = ApiConfig.checkUser;
    return HttpRequest.requestJsonPost(url,options)
}

function getUserUrl(options){
    let url = ApiConfig.getUserUrl;
    return HttpRequest.requestJsonPost(url,options)
}

function getFlowCount(options){
    let url = ApiConfig.getFlowCountUrl;
    return HttpRequest.requestJsonPost(url,options)
}

function getFileService(data) {
    let url = ApiConfig.serviceUrl;
    return HttpRequest.requestJsonPost(url,data)
}

// 获取文件服务器是否可用
function getFileServiceStatus(data) {
    let url = ApiConfig.getFileServerStatus;
    return HttpRequest.requestJsonPost1(url,data)
}
function getColumnSettings(data){
    let url = ApiConfig.getColumnSettings;
    return HttpRequest.requestJsonPost(url,data)
}
function getSystemSetting(data) {
    let url = ApiConfig.getSystemSetting;
    return HttpRequest.requestJsonPost(url,data)
}
function getMenusByLoginUser(data) {
    let url = ApiConfig.getMenusByLoginUser;
    return HttpRequest.requestJsonPost(url,data)
}
let Service = {
    getMenuSearch,
    getUserInfo,
    checkUser,
    getUserUrl,
    getFileService,
    getFileServiceStatus,
    getFlowCount,
    getColumnSettings,
    getSystemSetting,
    getMenusByLoginUser
};

export default Service;